<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<%@ taglib  prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 

<div id="menu" align="center" class="menubj2">

	<li class="mainlevel" reft="1" href="<%=basePath%>index.jsp">
		<div
			<c:choose>

				<c:when test="${requestScope.m1 == null }"> 
				  id="m1"
 				</c:when>
                <c:otherwise>
                  id="m2"
                </c:otherwise>
 			</c:choose>
			align="center"
			style="height: auto; width: 100%; float: none; cursor: pointer">

			首页
		</div>
	</li>
	<c:forEach items="${applicationScope.categorys}" var="category">
		<c:if test="${category.pid eq 0}">
			<li class="mainlevel" reft="2"
				href="<%=basePath%>webs/category.do?m1=${category.id}">
				<div
				<c:choose>
 				<c:when test="${requestScope.m1!=null && requestScope.m1.id==category.id }"> 
				  id="m1"
 				</c:when>
                <c:otherwise>
                  id="m2"
                </c:otherwise>
 			   </c:choose>
					  align="center"
					style="height: auto; width: 100%; float: none; cursor: pointer">
					<c:out value="${category.name}" />
				</div>
				<ul class="nav_new">
					<li
						style="width: 93px; height: 9px; margin: 0px; line-height: 5px; font-size: 0px; padding: 0px; background: url(<%=basePath%>images/mmbj1.gif);"></li>
					<c:forEach items="${applicationScope.categorys}" var="cate_1">
						<c:if test="${cate_1.pid eq category.id}">
							<li>
								<a
									href="<%=basePath%>webs/category.do?m1=${category.id}&m2=${cate_1.id}">
									<font color="#000"><c:out value="${cate_1.name}" /> </font> </a>
							</li>
						</c:if>
					</c:forEach>
					<li
						style="width: 93px; height: 5px; line-height: 5px; font-size: 0px; margin: 0px; padding: 0px; background: url(<%=basePath%>images/mmbj2.gif);"></li>
				</ul>
			</li>
		</c:if>
	</c:forEach>

</div>

<script type="text/javascript"> 
 var menubj="1";
$(document).ready(function(){
 $("#m"+menubj).css({"font-size":"14px","font-weight":"bold"});
  $('li.mainlevel').mousemove(function(){
  $(this).find('ul').slideDown();//you can give it a speed
  });
  $('li.mainlevel').mouseleave(function(){
   
   $(this).find('ul').slideUp("fast");
  });
  $('li.mainlevel').click(function(){
    var v=$(this).attr("href");
	window.location.href=v;
  });
});
 
</script>
